package com.bckj.fastboot.core.extra.datascope;


import com.bckj.fastboot.core.extra.datascope.model.DataScope;

public class DataFilterThreadLocal {
    private static final ThreadLocal<DataScope> ThreadLocalDataFilter = new ThreadLocal<>();

    public DataFilterThreadLocal() {
    }

    public static void clear() {
        ThreadLocalDataFilter.remove();
    }

    public static void set(DataScope localDataScope) {
        ThreadLocalDataFilter.set(localDataScope);
    }

    public static DataScope get() {
        return (DataScope)ThreadLocalDataFilter.get();
    }
}
